package com.bum.api.processor.ext;

import org.apache.commons.lang.StringUtils;

import com.bum.api.core.exp.IApiService;
import com.bum.api.core.exp.om.Metas;
import com.bum.api.core.exp.om.Params;
import com.bum.api.core.service.process.ApiProcess;

public class ExtJsonProcess extends ApiProcess {
	IApiService	extJsonService;

	@Override
	public String process(String path, Params params, Metas metas) {
		String[] parts = StringUtils.split(path, "/", 2);
		return extJsonService.getJson(parts[1], params, metas);
	}

	public void setExtJsonService(IApiService extJsonService) {
		this.extJsonService = extJsonService;
	}
}
